import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:hotpot/widgets/z_container.dart';

class IconBox extends StatelessWidget {
  final IconData data;
  final double size;
  final Color color;
  final Color bgColor;
  final double? paddingSize;
  final double iconSize;

  const IconBox(this.data, this.size, this.iconSize, {super.key, this.paddingSize, this.color = Colors.white, this.bgColor = Colors.white24});

  @override
  Widget build(BuildContext context) {
    return ZContainer(
      radius: 100,
      color: bgColor,
      width: size,
      height: size,
      alignment: Alignment.center,
      padding: EdgeInsets.all(paddingSize ?? 0),
      child: Icon(data, color: color, size: iconSize.w),
    );
  }
}
